package com.dmall.promotion.useraop.event;

import com.dmall.promotion.enums.UserOperationEnum;
import org.springframework.context.ApplicationEvent;

/**
 * 用户操作事件对象
 * 用于封装操作的类型，目标方法的参数和返回值
 * @author xiao1.wang
 * @date 2021-06-03 22:00:37
 */
public class UserOperationEvent extends ApplicationEvent {

    private static final long serialVersionUID = 3155039301889447346L;

    public UserOperationEvent(Object source) {
        super(source);
    }

    /** 操作类型 */
    private UserOperationEnum operation;
    /** 目标方法参数 */
    private Object[] params;
    /** 目标方法返回值 */
    private Object result;

    public UserOperationEnum getOperation() {
        return operation;
    }

    public void setOperation(UserOperationEnum operation) {
        this.operation = operation;
    }

    public Object[] getParams() {
        return params;
    }

    public void setParams(Object[] params) {
        this.params = params;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
